const passwords=document.getElementsByClassName("password");
const menu_nums=document.getElementsByClassName("menu-num");
for(var obj of passwords){
    obj.flag=false;
}
for(var num of menu_nums){
    num.onclick=inputNum;
}
function inputNum(){
    var num=this.innerText;
    var clearFlag=true;
    for(var obj of passwords){
        if(!obj.flag){
            obj.flag=true;
            obj.innerText=num;
            clearFlag=false
            break;
        }
    }
    if(clearFlag){
        for(var obj of passwords){
            obj.innerText="-";
            obj.flag=false
        }
    }
    
}




